package cn.maihe.elg.operation.service.ConfigurationCenter.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.Map;


@Component
@ConfigurationProperties(prefix = "cn.maihe.elg.center-info-config.epoint-center-map.ningde")
public class CenterConfig {
    private Map<String, CenterInfo> centers;

    @Data
    public static class CenterInfo {
        //接入状态
        private Integer status;
        //接入渠道
        private String channel;
        //平台名称
        private String platformName;
        //回调地址
        private String callbackUrl;
        //应用 ID
        private Integer appId;
        //版本号
        private String version;

        private Integer slat;
        //SM2公钥
        private String sm2PublicKey;
        //SM2私钥
        private String sm2PriKey;
        //保费率
        private BigDecimal feeRate;
        //保费保底金额
        private BigDecimal feeBase;
        //保费封顶金额
        private BigDecimal feeTop;
        //是否同步支付结果
        private Boolean syncPayResult;
    }

    public Map<String, CenterInfo> getCenters() {
        return centers;
    }

    public void setCenters(Map<String, CenterInfo> centers) {
        this.centers = centers;
    }
}
